<section id="trainer-profile">
    <div class="row">
        <div class="container">
            <div class="col-lg-12 column12">
                <div id="bread">
                    <ol class="breadcrumb">
                        <li><a href="<?php echo SITE_URL; ?>">Home</a></li>                      
                        <li class="active">Trainer Review</li>
                    </ol>
                </div><!-- breadcrumb div ends here --> 
            </div>  

            <div class="review-page">
                <?php
                if (!empty($reviewdata)) {
                    foreach ($reviewdata as $reviews) {
                        if ((isset($_GET['type']) && $_GET['type'] == 'frontend')) {
                            $trainerDetail = Users::getFrontEndUser($reviews->to_user_id);
                        } else {
                            $trainerDetail = Users::getBackEndUser($reviews->backend_user_id);
                        }
                        $userDetail = Users::getFrontEndUser($reviews->from_user_id);
                        $imgsrc = (isset($userDetail->photo) && $userDetail->photo<> "") ? getRequestbaseUrl() . getuploadFolderDir() . $userDetail->user_id . '/profile/minithumb/' . $userDetail->photo : getWorkNoshopimage(SkillConfig::skill_myinbox_image);
                        ?>

                        <div class="row">
                            <div class="col-lg-12 col-sm-12 column12 col-md-12 mopo">
                                <div class="row"> <div  class="col-lg-2 col-sm-2 column2 col-md-2 padding-zero-left"> <img src="<?php echo $imgsrc; ?>" alt="..."> </div>
                                    <div  class="col-lg-10 col-sm-10 column10 col-md-10"> 
                                        <div class="caption">
                                        <h5>Trainer Name:<?php echo (!empty($trainerDetail->first_name)) ? $trainerDetail->first_name . ' ' . $trainerDetail->last_name : SkillConfig::SKILL_NO_USERNAME; ?></h5>
                                        <p><?php echo $reviews->reviews_text; ?></p>
                                        <p>
                                            <?php echo (!empty($userDetail->first_name)) ? $userDetail->first_name . ' ' . $userDetail->last_name : SkillConfig::SKILL_NO_USERNAME; ?>
                                            <span> &nbsp;:&nbsp; </span><?php echo $reviews->create_time; ?>        
                                        </p> 
                                            
                                        </div>
                                        
                                    </div>


                                </div>
                            </div>
                        </div>
                        <div class="gap"> </div> <div class="gap"> </div>
                    <?php }
                    ?>
                    <div class="col-lg-12 col-sm-12 column12 col-md-12">
                        <div class="row"> <div  class="col-lg-2 col-sm-2 column2 col-md-2"> </div>
                            <div  class="col-lg-10 col-sm-10 column10 col-md-10"> 
                                <div class="errorMessage"><?php echo $reviewMessage; ?></div>
                            </div>


                        </div>
                    </div>
                <?php }
                ?>




                <div class="gap"></div> <div class="gap"></div>



            </div> <!-- trainer-profile container ends here --> 
        </div>       
</section>